﻿using furion.blog.Application.Contracts;
using furion.blog.Domain.Query.Building;
using furion.blog.Domain.Shared.Attribute;
using furion.blog.Utils;
using Microsoft.AspNetCore.Mvc;

namespace furion.blog.Web.Entry.Api
{
    [Route("api/building")]
    public class BuildingApiController
    {
        private readonly IBuildingService _buildingService;
        public BuildingApiController(IBuildingService buildingService)
        {
            this._buildingService = buildingService;
        }

        /*********************后台接口*****************************************************/

        [ActionAttribute(Name = "楼盘分页接口", Desc = "获取楼盘分页信息")]
        [HttpGet, Route("list")]
        public async Task<IActionResult> list([FromQuery] BuildingListQuery query)
        {
            var ret = await this._buildingService.List(query);
            return new OkObjectResult(ResultUtil.Success(ret));
        }


        /*********************用户端接口*****************************************************/


    }
}
